<script>
export default {
  onLaunch () {
    // #ifdef  MP-WEIXIN
    wx.cloud.init();
    const updateManager = uni.getUpdateManager();
    // 请求完新版本信息的回调
    updateManager.onCheckForUpdate(function (res) {
      console.log('hasUpdate', res.hasUpdate);
    });
    // 新的版本已经下载好
    updateManager.onUpdateReady(function (res) {
      uni.showModal({
        title: '更新提示',
        content: '新版本已经准备好，点击重启应用',
        showCancel: false,
        success (res) {
          updateManager.applyUpdate();
        }
      });
    });
    // 新的版本下载失败
    updateManager.onUpdateFailed(function (res) {
      uni.showModal({
        title: '更新提示',
        content: '新版本下载失败，请手动重启小程序',
      });
    });
    // #endif
  },
  onShow () {
  },
  onHide () {
  },
  methods: {
  },
}
</script>

<style lang="less">
@import "/colorui/main.css";
@import "/colorui/icon.css";
page {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  background-color: #f1f1f1;
  font-size: 28rpx;
  color: #333333;
}
@font-face {
  font-family: "alifont";
  src: url("https://at.alicdn.com/t/font_1342475_8arxuo5dwc7.ttf")
    format("truetype");
}
.alifont {
  position: relative;
  font-size: 50rpx;
  height: 50rpx;
  font-family: "alifont" !important;
  font-style: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;
}
span,
div,
input {
  font-size: 36rpx;
  color: @blue-drak;
  box-sizing: border-box;
  letter-spacing: 2rpx;
  text-indent: 2rpx;
}
button {
  padding: 0;
  line-height: normal;
  margin: 0;
  &::after {
    border: none;
  }
  &:active {
    .clickAnimation;
  }
}
.clickAnimation {
  transform: translate(2rpx, 2rpx);
}
.miniFont {
  font-size: 26rpx;
}
@white: #ffffff;
@white-light: #e9edf0;
@black: #303133;
@orange: #f9650c;
@orange-light: #fee0ce;
@blue: #09acfe;
@blue-light: #dbf3ff;
@blue-drak: #434b65;
@yellow: #ff9d00;
@green: #44c07a;
@green-drak: #1e7f51;
@gray: #909399;
@gray-light: #c0c4cc;
@gray-light2: #eff2f7;
@gray-drak: #606266;
// 全局颜色
.black {
  color: @black;
}
.white {
  color: @white;
}
.white-light {
  color: @white-light;
}
.orange {
  color: @orange;
}
.orange-light {
  color: @orange-light;
}
.blue {
  color: @blue;
}
.blue-light {
  color: @blue-light;
}
.blue-drak {
  color: @blue-drak;
}
.yellow {
  color: @yellow;
}
.green {
  color: @green;
}
.green-drak {
  color: @green;
}
.gray {
  color: @gray;
}
.gray-light {
  color: @gray-light;
}
.gray-drak {
  color: @gray-drak;
}
// 全局背景色
.blackBG {
  background-color: @black;
}
.whiteBG {
  background-color: @white;
}
.white-lightBG {
  background-color: @white-light;
}
.blueBG {
  background-color: @blue;
}
.orangeBG {
  background-color: @orange;
}
.yellowBG {
  background-color: @yellow;
}
.yellowBG {
  background-color: @yellow;
}
.gray-light2BG {
  background-color: @gray-light2;
}
.grayBG {
  background-color: @gray;
}
.greenBG {
  background-color: @green;
}
.blueBG {
  background-color: @blue;
}
// 边框
.border-white-light {
  border: @white-light 1rpx solid;
}
.border-gray-light {
  border: @gray-light 1rpx solid;
}
.border-gray-light2 {
  border: @gray-light2 1rpx solid;
}
// 底部边框
.bottom-white-light {
  border-bottom: @white-light 1rpx solid;
}
// 边框颜色
.border-color-white-light {
  border-color: @white-light;
}
.border-color-gray-light2 {
  border-color: @gray-light2;
}
// 其他全局样式
.box-shadow {
  box-shadow: 0rpx 6rpx 24rpx rgba(0, 0, 0, 0.11);
}
.padding-ho {
  padding-left: 36rpx;
  padding-right: 36rpx;
}
.margin-ho {
  margin-left: 36rpx;
  margin-right: 36rpx;
}
.oneLine-hidden {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
</style>
